import request from "@/utils/request"

export const reserList = (search) =>
    request({
        url: "/reserAll",
        method: "get",
        params: {
            value: search.value,
            offset: search.offset,
            limit: search.limit
        }
    })

export const reserDelete = (id) =>
    request({
        url: "/deleteReserById" + id,
        method: "delete",
    })

export const addReservation = (reservation, mid) =>
    request({
        url: "/addReservation" + mid,
        method: "post",
        data: reservation
    })

export const CancelReser = (id) =>
    request({
        url: "/cancelReser" + id,
        method: "post"
    })

export const confirmReser = (id) =>
    request({
        url: "/confirmReser" + id,
        method: "post"
    })